package com.uetoken.cn.adapter.holder;

import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.uetoken.cn.R;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class AddChildAccountHolder {

    @BindView(R.id.mainPopupLayout)
    public RelativeLayout mMainPopupLayout;
    @BindView(R.id.arrow_up)
    public ImageView mArrowUp;
    @BindView(R.id.recyclerView)
    public RecyclerView mRecyclerView;
    @BindView(R.id.contentLayout)
    public RelativeLayout mContentLayout;
    @BindView(R.id.line1)
    public View line1;
    @BindView(R.id.addAccountIv)
    public ImageView mAddAccountIv;
    @BindView(R.id.addAccountTv)
    public TextView mAddAccountTv;
    @BindView(R.id.popupLayout)
    public RelativeLayout mPopupLayout;
    @BindView(R.id.addAccountLayout)
    public RelativeLayout mAddAccountLayout;

    private OnAddChildAccountClickListener mOnAddChildAccountClickListener;

    public interface OnAddChildAccountClickListener {
        void onAddChildAccountClick(View view);
    }

    public void setOnAddChildAccountClickListener(OnAddChildAccountClickListener onAddChildAccountClickListener) {
        this.mOnAddChildAccountClickListener = onAddChildAccountClickListener;
    }

    public AddChildAccountHolder(View view) {
        ButterKnife.bind(this, view);
    }

    @OnClick({R.id.addAccountIv, R.id.addAccountTv})
    public void onViewClicked(View view) {
        if (mOnAddChildAccountClickListener != null) {
            mOnAddChildAccountClickListener.onAddChildAccountClick(view);
        }
    }
}
